package powtorka.sieciowa.bis;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.Socket;
import java.net.UnknownHostException;

public class Klient {

	public void start() {
		
		try {
			Socket gniazdo = new Socket("127.0.0.1", 4200);
			BufferedReader br = new BufferedReader(new InputStreamReader(gniazdo.getInputStream()));
			String s;
			while((s = br.readLine()) != null)
				System.out.println(s);
			br.close();
		} catch (UnknownHostException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		
	}
}
